﻿using Microsoft.AspNetCore.Mvc;
using ZhongKeSite.Common;
using ZhongKeSite.Entity;
using ZhongKeSite.Service;

namespace ZhongKeSite.Web.Models
{
    public class BaseController : Controller
    {
        public bool success = false;
        public string msg = string.Empty;
        public BaseController()
        {

        }
        /// <summary>
        /// 当前登录用户信息
        /// </summary>
        public CurrentUser CurrentUser
        {
            get
            {
                ISysService sysService = IOCContainerManager.Resolve<ISysService>();
                return sysService.GetCurrentUser(HttpContext, CommonConst.AdminAuthenticationScheme);
            }
        }
    }
}
